package prueba.activiti;

import prueba.servicios.GPSServicio;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import com.google.android.maps.MapActivity;

public class PruebaGAPI4 extends MapActivity{
    /** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle icicle) {
	  super.onCreate(icicle);
	  try {

	    // setup and start MyService
	    {
	      GPSServicio.setMainActivity(this);
	      Intent svc = new Intent(this, GPSServicio.class);
	        startService(svc);
	      //startService(svc, Bundle.EMPTY);
	    }

	  }
	  catch (Exception e) {
	    Log.e("Servicio", "ui creation problem", e);
	  }

	}

	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();
		// stop GPSServicio
		Intent svc = new Intent(this, GPSServicio.class);
		stopService(svc);
	}
}